<template>
  <div class="container">
    <Category title="娱乐">
      <!-- scope值的数据类型为对象,slot传递过来的数据是以对象属性展示的,所以需要.出来 -->
      <template scope="Category">
        <ul>
          <li v-for="(g, index) in Category.games" :key="index">{{ g }}</li>
        </ul>
      </template>
    </Category>

    <Category title="娱乐">
      <template scope="Category">
        <ol>
          <li v-for="(g, index) in Category.games" :key="index">{{ g }}</li>
        </ol>
      </template>
    </Category>

    <Category title="娱乐">
      <template scope="Category">
        <h4 v-for="(g, index) in Category.games" :key="index">{{ g }}</h4>
      </template>
    </Category>
  </div>
</template>

<script>
import Category from "./components/Category.vue";
export default {
  name: "App",
  components: { Category },
};
</script>

<style>
.container,
.foot {
  display: flex;
  justify-content: space-between;
}
img {
  width: 100%;
}
video {
  width: 100%;
}
.footer {
  text-align: center;
}
.footer a {
  padding: 5px;
}
h4 {
  text-align: center;
}
</style>